// by Tyrghen
#define THIS_FILE "x_healatmhq.sqf"
#include "x_setup.sqf"

private "_mhq";
_mhq = _this select 0;
if ((player distance _mhq) > 5) exitWith { systemChat (localize "STR_DOM_MISSIONSTRING_2003") };
player playMove "AinvPknlMstpSlayWrflDnon_medic";
sleep 5;
waitUntil {!Alive player || (animationState player != "AinvPknlMstpSlayWrflDnon_medic" && animationState player != "amovpercmstpsraswrfldnon_amovpknlmstpsraswrfldnon" && animationState player != "amovpknlmstpsraswrfldnon_ainvpknlmstpslaywrfldnon" && animationState player != "ainvpknlmstpslaywrfldnon_amovpknlmstpsraswrfldnon")};
if (alive player) then {
	if ((player distance _mhq) > 5) exitWith { systemChat (localize "STR_DOM_MISSIONSTRING_2003") };
	player setBleedingRemaining 0;
	player setDamage 0;
};